<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>{:$page_info['title']}</title>
<link rel="icon" href="favicon.ico" type="__STATIC__/admin/image/ico">

<meta name="author" content="yinqi">
<link href="__STATIC__/admin/css/bootstrap.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/materialdesignicons.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/style.min.css" rel="stylesheet">

<link href="__STATIC__/common/select2/select2.css" rel="stylesheet">
<link href="__STATIC__/admin/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">

<link href="__STATIC__/admin/css/cch.css" rel="stylesheet">
</head>
  
<body>
<div class="container-fluid p-t-15">
  
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-toolbar clearfix">
          <form class="pull-right search-bar" method="get" action="{:url($page_info['action'])}" role="form">
            {include file="html/search" /}
          
          </form>
          <div class="toolbar-btn-action">
            <a class="btn btn-primary m-r-5" href="{:url('add')}"><i class="mdi mdi-plus"></i> 新增</a>
            <a class="btn btn-success m-r-5 search_btn" href="javascript:void(0)"><i class="mdi mdi-magnify"></i> 搜索</a>
          </div>
        </div>
        <div class="card-body">
          
          <div class="table-responsive">
            <table class="table table-bordered">
              <thead>
                <tr>
                    <th class="idTd">ID</th>
                    <th>标题</th>
                    <th>图片</th>
                    <th>排序值</th>
                    <th class="timeTd">创建时间</th>
                    <th class="operateTd">操作</th>
                </tr>
              </thead>
              <tbody>
                <?php if (empty($list['data'])): ?>
                    <tr><td colspan="100" class="text-center">暂无数据</td></tr>
                <?php else: ?>
                    <?php foreach ($list['data'] as $k => $vo): ?>
                    <tr>
                        <td class="text-center">{:$vo['id']}</td>
                        <td>{:$vo['title']}</td>
                        <td class="cch_thumbnail_td"><img src="__UPLOAD__/{:$vo['image']}" class="cch_thumbnail" /></td>
                        <td>{:$vo['sort']}</td>
                        <td>{:timeDef($vo['ctime'])}</td>
                        <td class="text-center">
                            <div class="btn-group">
                                <a class="btn btn-xs btn-default" href="{:url('edit',['id'=>$vo['id']])}" data-toggle="tooltip" title="编辑"><i class="mdi mdi-pencil"></i></a>
                                <a class="btn btn-xs btn-default delete_btn" href="{:url('delete',['id'=>$vo['id']])}" data-toggle="tooltip" title="删除"><i class="mdi mdi-delete"></i></a>
                            </div>
                        </td>
                    </tr>
                    <?php endforeach ?>
                <?php endif ?>
              </tbody>
            </table>
          </div>


          {$page|raw}
 
        </div>
      </div>
    </div>
    
  </div>
  
</div>

<script type="text/javascript" src="__STATIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/main.min.js"></script>

<!-- 时间选择器 -->
<script src="__STATIC__/admin/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="__STATIC__/admin/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="__STATIC__/admin/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>

<script src="__STATIC__/common/select2/select2.min.js"></script><!-- 下拉搜索 -->

<script type="text/javascript" src="__STATIC__/admin/js/lyear-loading.js"></script><!-- loading -->
<script type="text/javascript" src="__STATIC__/admin/js/cch.js"></script>
</body>
</html>